﻿using Grow.Domain.EventBus.Cap.PublisherDomainEvents;

namespace Grow.Domain.EventBus.Cap.SubscriberDomainEvents
{
    public interface ISubscriberDomainEventService
    {
        Task SaveSubscriberEventAsync(SubscriberDomainEventDto subscriberDomainEventDto, CancellationToken cancellationToken);

        Task<bool> LockSubscriberEventAsync(Guid Id, CancellationToken cancellationToken);

        Task UpdateSubscriberEventAsync(Guid Id, SubscriberDomainEventStatus subscriberDomainEventStatus, CancellationToken cancellationToken);


        Task ExpirerSubscriberDomainEventAsync(CancellationToken cancellationToken);

        Task<List<SubscriberDomainEventDto>> GetSubscriberDomainEventsOfNeedRetryAsync(CancellationToken cancellationToken);
    }
}
